home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group03a.txt
/
000043_icon-group-sender_Tue Mar 25 12:29:33 2003.msg
< prev
next >
Wrap
Internet Message Format
|
2003-12-22
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2PJSvM11424
for icon-group-addresses; Tue, 25 Mar 2003 12:28:57 -0700 (MST)
Message-Id: <200303251928.h2PJSvM11424@baskerville.CS.Arizona.EDU>
From: voice_of_reason@australia.edu (Quiet Voice)
X-Newsgroups: comp.lang.icon
Subject: newbie question -- ressurected
Date: 25 Mar 2003 10:44:58 -0800
X-Complaints-To: groups-abuse@google.com
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Greetings:
Several years ago, I made a brief foray into trying to teach myself
the ICON programming language and develop some text analysis software.
After several fits-n-starts, the project sort of died on the vine.
I'm back at it again. Now, I'm trying to dig thru past code, remind
myself of what it was supposed to do and how...and shake out the
kinks.
I ran a piece of code this morning and discovered that it results in
an infinite loop.....but I can't figure out why.
here is the code fragment:
while not((line := read(data)) == "") do every
write(lettercount[!line] +:= 1)
{Note, this is one continuous line in the actual code}
"data" is an input text file
>From some debugging I've done, it seems like it keep reading from the
file after it reaches the end...it just loops back to the begining of
the file and starts over again. But I don't figure out why.
What am I missing?
Assistance appreciated.
Thanks!!